<%@ page import="期中22.Pd" %>
<%@ page import="期中22.Thesql" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title>结果</title>
	<style type="text/css">
	div {margin: 100px 600px;}
   	p {display: inline;}
   	h2 {text-align: center;
       color: blue;}
	</style>
</head>
<body>
<%
	Thesql the=new Thesql();
  	try{
		String zhuti=request.getParameter("zhuti");
		if(!the.pdname(zhuti))
		{
%>
	<script type="text/javascript" >
	    alert("错误:姓名输入有误，未找到该姓名，请重新输入。");         //弹出提示框输出错误信息
	    window.location='Shanchu.jsp' ;     //跳转到登录界面
</script>
<%	
		}
		else 
		{
			Pd pdd=the.show(the.findname(zhuti));
%>
<div>
		<h2>原信息</h2>
		<p>活动主题</p><%out.print("   "+pdd.zhuti); %><br>
		<p>活动目的</p><%out.print("   "+pdd.mudi); %><br>
		<p>活动类型</p>
<%		switch(pdd.leixing){
			case 1:out.print("   社团竞赛");break;
			case 2:out.print("   野外采风");break;
			case 3:out.print("   校内集会");break;
			case 4:out.print("   社团纳新");break;
}	
%><br>
		<p>活动时间</p><%out.print("   "+pdd.shijian); %><br>
		<p>活动地点</p><%out.print("   "+pdd.didian); %><br>
		<p>活动对象</p>
<%
		if(pdd.duixiang1==1)
			out.print("   社团成员"); 
		if(pdd.duixiang2==1)
			out.print("   全体学生"); 
%><br>
		<p>活动内容</p><%out.print("   "+pdd.neirong); %><br>
		<p>活动日程安排</p><%out.print("   "+pdd.anpai); %><br>
<form name="form1" method="get" action="Tijiao5.jsp">
	<%int tid=the.findname(zhuti); %>
	<input type="hidden"  name="tid" value=<%=tid%> >
    <button type="submit" onclick="fun()">删除</button>
</form>
	
	
</div>
<%
		}
		
  	}
  	catch(Exception e) {
  		e.printStackTrace();
 %>
 <script type="text/javascript" >
    alert("错误:信息未输入完整，请重新输入。");         //弹出提示框输出错误信息
    window.location='Xiugai.jsp' ;     //跳转到登录界面
 </script>
<%
  	}

  	
	//out.print(pdd.show(hb));
%>
<script type="text/javascript">
  function fun() {
   alert('是否确认删除')
  }
 </script>

</body>
</html>